import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpStorageGroup {
  id!: number;
  title!: string;
  type!: number;
  uniacid!: number;
  uid: number = 0;
  pid: number = 0;
  addTime!: string;
  updateTime!: string;
}

export const ImsYzdKpStorageGroupSchema = new EntitySchema({
  class: ImsYzdKpStorageGroup,
  properties: {
    id: { primary: true, type: 'number' },
    title: { type: 'string', length: 255 },
    type: { type: 'number', index: 'type' },
    uniacid: { type: 'number', index: 'uniacid' },
    uid: { type: 'number', default: 0 },
    pid: { type: 'number', default: 0 },
    addTime: { type: 'string', length: 255 },
    updateTime: { type: 'string', length: 255 },
  },
});
